#ifndef _TOOL_KIT_H
#define _TOOL_KIT_H

#include "sc95f.h"

#define TIME_OUT_WORK		0
#define FIRST_ENTER			1
#define TIME_NOT_OUT		2

#define SYS_TIME_OUT 200000

#ifndef ON
#define ON 1
#endif

#ifndef OFF
#define OFF 0
#endif

typedef enum{
	MESSAGE_SOURCE_NONE = 0,
	MESSAGE_SOURCE_BUTTON,
	MESSAGE_SOURCE_CLOUD,
	MESSAGE_SOURCE_SYSTEM,
	MESSAGE_SOURCE_MAX
}message_source_type_e;

typedef struct{
	uint32_t source;
	uint32_t command;
	uint32_t value;
	bool activeFlag;
}message_queue_t;

//#define SYS_MESSAGE_QUEUE_NUM_MAX 5

//int message_queue_send(message_queue_t* msg);
//int message_queue_recv(message_queue_t* msg, uint32_t waitMs);


uint8_t device_timeout_count(uint32_t* time_enter,uint32_t time_out);
#endif